diff --git a/caching/caching.go b/caching/caching.go index 37b90521..d8f9bbbd 100644 --- a/caching/caching.go +++ b/caching/caching.go @@ -53,7 +53,7 @@ func LoadEntityArrayFromCache(wf *aw.Workflow, session *session.Session, cacheNa maxCacheAge := 1 * time.Minute if wf.Cache.Expired(cacheName, maxCacheAge) { log.Printf("cache with key `%s` did not exist or was expired in %s", cacheName, wf.CacheDir()) - wf.Rerun(0.2) + wf.Rerun(0.4) if !wf.IsRunning(jobName) { cmd := exec.Command(os.Args[0], "-query="+fullQuery+"", "-fetch") log.Printf("running `%s` in background as job `%s` ...", cmd, jobName) diff --git a/env.sh b/env.sh index b07f52a1..a991d6a7 100644 --- a/env.sh +++ b/env.sh @@ -7,14 +7,14 @@ export alfred_workflow_version=1.0 if [ "$(uname)" == "Darwin" ] && [ -z "$TEST" ]; then # make this mirror where alfred stores cache/data if [ -d "$HOME/Library/Application Support/Alfred" ]; then - data_dir="com.runningwithcrayons.Alfred" - cache_dir="Alfred" + cache_dir="com.runningwithcrayons.Alfred" + data_dir="Alfred" else - data_dir="com.runningwithcrayons.Alfred-3" - cache_dir="Alfred 3" + cache_dir="com.runningwithcrayons.Alfred-3" + data_dir="Alfred 3" fi - export alfred_workflow_data="$HOME/Library/Caches/$cache_dir/Workflow Data/$alfred_workflow_bundleid" - export alfred_workflow_cache="$HOME/Library/Application Support/$data_dir/Workflow Data/$alfred_workflow_bundleid" + export alfred_workflow_data="$HOME/Library/Application Support/$data_dir/Workflow Data/$alfred_workflow_bundleid" + export alfred_workflow_cache="$HOME/Library/Caches/$cache_dir/Workflow Data/$alfred_workflow_bundleid" else # CI won't have alfred directories, so just create in repo root root="$(git rev-parse --show-toplevel)/.alfred"