Commit graph

77 commits

Author SHA1 Message Date
Joey Hess
c0aec874a2 webapp: avoid infinite loop on start
If the autostart file lists a repository, for which a directory exists,
but there's not actually a valid git repo in there, the web app used to
try to use it, and see it wasn't valid, and then try to autostart again.

The ensuing runaway loop also ate memory, although not as fast as I was led
to belive was happening to someone on IRC yesterday. So that guy may have
had a different problem. But this seems otherwise a reasonable fit for the
circumstances described, if git-annex was started before something that
occurred during desktop login that made the repository available.
2012-10-11 12:08:11 -04:00
Joey Hess
3da78cc241 make the standalone OSX app automatically install itself when run 2012-09-26 16:50:04 -04:00
Joey Hess
582316f66f avoid webapp crash on startup when there's no ~/.gitconfig
git config --list --global exits nonzero when there's no global config
2012-09-23 12:43:14 -04:00
Joey Hess
ba0334116c more descriptive name for oneshot 2012-09-15 20:46:38 -04:00
Joey Hess
df337bb63b hlint 2012-09-13 00:57:52 -04:00
Joey Hess
e59b0a1c88 first pass at alert buttons
They work fine. But I had to go to a lot of trouble to get Yesod to render
routes in a pure function. It may instead make more sense to have each
alert have an assocated IO action, and a single route that runs the IO
action of a given alert id. I just wish I'd realized that before the past
several hours of struggling with something Yesod really doesn't want to
allow.
2012-09-08 19:57:15 -04:00
Joey Hess
a00f1d26bc display errors when any named thread crashes 2012-09-06 14:56:04 -04:00
Joey Hess
b6b8f6da9c implement resuming of paused transfers
Currently waits for a new transfer slot to open up, which probably needs to
change..
2012-08-12 12:11:20 -04:00
Joey Hess
fb4b19deed make the webapp honor the web.browser git config 2012-08-08 13:15:35 -04:00
Joey Hess
3add2cd3ba wire up scan and transfer to newly added removable drive
remote setup still todo
2012-08-04 21:18:57 -04:00
Joey Hess
60da0d6ad2 full autostart support
git annex assistant --autostart will start separate daemons in each
listed autostart repo

running the webapp outside any git-annex repo will open it on the
first listed autostart repo
2012-08-02 00:42:33 -04:00
Joey Hess
d7a2600edd webapp is no longer a daemon
Remove --foreground and --stop options from it.
2012-08-01 16:40:38 -04:00
Joey Hess
ca512f1450 always run webapp in foreground 2012-08-01 16:34:17 -04:00
Joey Hess
8181b38ef6 write pid file even when running in foreground
This prevents multiple runs of the assistant in the foreground, and lets
--stop stop foregrounded runs too.

The webapp firstrun case also now writes a pid file, once it's made the git
repo to put it in.
2012-08-01 16:30:53 -04:00
Joey Hess
ecc168aba3 implemented firstrun repository creation and redirection to full webapp
Some of the trickiest code I've possibly ever written.
2012-08-01 16:10:26 -04:00
Joey Hess
bcf5c81593 when run in uninitialized git repo, do firstrun
My $HOME is in git, let's make it work :)
2012-07-31 16:19:24 -04:00
Joey Hess
1efb0d109e don't start webapp when in a git repo that has not been git-annex initted
Maybe later it can prompt if they want to use the repo with git-annex, but
for now this is a sane easy choice.
2012-07-31 12:20:31 -04:00
Joey Hess
04794eafc0 webapp now starts up when run not in a git repo 2012-07-31 12:17:31 -04:00
Joey Hess
adae40a292 now the webapp has the same options as the assistant 2012-07-27 15:40:52 -04:00
Joey Hess
02ec8ea012 much better webapp startup of the assistant
This avoids forking another process, avoids polling, fixes a race,
and avoids a rare forkProcess thread hang that I saw once time
when starting the webapp.
2012-07-27 15:33:24 -04:00
Joey Hess
9b2eec2e7a increase timeout from 10 to 100 seconds
I've seen 10 be too short under load.
2012-07-26 18:04:09 -04:00
Joey Hess
e79198aacb when starting the assistant, wait for it to create the shim file, as well as the pid file
fixes a possible race
2012-07-26 15:28:08 -04:00
Joey Hess
860415aa5b webapp: check that the shim exists, and restart the assistant if not 2012-07-26 14:27:32 -04:00
Joey Hess
3c117685eb on second thought, let's use --restart rather than --force
--force could enable other, unwanted behavior
2012-07-26 12:17:28 -04:00
Joey Hess
cccdb44874 git annex webapp --force forces a restart of the daemon
Useful for testing..
2012-07-26 11:52:49 -04:00
Joey Hess
81b40cf882 fix editor damage 2012-07-25 23:50:14 -04:00
Joey Hess
1ffef3ad75 git annex webapp now opens a browser to the webapp
Also, starts the assistant if it wasn't already running.
2012-07-25 23:13:01 -04:00