Skip to content

Commit

Permalink
Temporarily change the daemon to 'verdi devel run_daemon'
Browse files Browse the repository at this point in the history
To have the daemon test script run on Travis, we had to change
the JobCalculations to go properly through the Process level.
However, that means that the old daemon, currently launched by
verdi daemon start, which launches a celery worker, won't be
able to run them at all.

Instead we temporarily replace the celery worker with a subprocess
call to `verdi devel run_daemon` which will run the new daemon
in the background. Note that this is not actually daemonized, but
just runs a DaemonRunner in a separate process. For the tests this
should work for the time being, until issue aiidateam#1055 is fixed, that
will implement a properly daemonized version of the daemon runner.
  • Loading branch information
sphuber committed Feb 20, 2018
1 parent 89b7e0a commit 7de9756
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions aiida/cmdline/commands/daemon.py
Original file line number Diff line number Diff line change
Expand Up @@ -158,15 +158,7 @@ def daemon_start(self, *args):

print "Starting AiiDA Daemon (log file: {})...".format(self.logfile)
currenv = _get_env_with_venv_bin()
process = subprocess.Popen([
"celery", "worker",
"--app", "tasks",
"--loglevel", "INFO",
"--beat",
"--schedule", self.celerybeat_schedule,
"--logfile", self.logfile,
"--pidfile", self._get_pid_full_path(),
],
process = subprocess.Popen(['verdi', 'devel', 'run_daemon'],
cwd=self.workdir,
close_fds=True,
stdout=subprocess.PIPE,
Expand Down

0 comments on commit 7de9756

Please sign in to comment.