Skip to content

Commit

Permalink
fixed data dirs in run env
Browse files Browse the repository at this point in the history
  • Loading branch information
rkoval committed Jul 27, 2020
1 parent 0faacbd commit 1c640c4
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion caching/caching.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
12 changes: 6 additions & 6 deletions env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit 1c640c4

Please sign in to comment.