Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Work on #392. #396

Merged
merged 1 commit into from
Jun 8, 2017
Merged

Work on #392. #396

merged 1 commit into from
Jun 8, 2017

Conversation

mjordan
Copy link
Collaborator

@mjordan mjordan commented Jun 6, 2017

Github issue: (#392)

What does this Pull Request do?

Changes shutdown hook scripts from running in the background to running in the foreground.

What's new?

As per the discussion in #392, we can't think of any reason to have shutdown hook scripts run as background processes. This PR replaces the code that allowed the scripts to run as a background process with a simple PHP exec() call.

How should this be tested?

This PR requires a smoke test; there are no PHPUnit tests to cover it.

To test:

  1. Check out the issue-392 branch.
  2. Unzip the attached file into your /tmp directory.
  3. Move (mv) all the files in the unzipped directory starting with issue-392* into your mik directory.
  4. Run ./mik -c issue-392.ini. You should see the following ouput:
./mik -c issue-392.ini
Commencing MIK.
Creating 5 Islandora ingest packages. Please be patient.
====================================================================================================> 100%
Running shutdown hook # ./issue-392-script1.sh
Running shutdown hook # ./issue-392-script2.sh
Done. Output packages are in /tmp/issue_392_output. Log is at /tmp/issue_392_output/mik.log

and your /tmp/directory should contain a file /tmp/hey.txt.

Additional Notes

We will need to update https://github.com/MarcusBarnes/mik/wiki/Shutdown-hooks.

Interested parties

@jpeak5 @MarcusBarnes

@mjordan mjordan mentioned this pull request Jun 6, 2017
@MarcusBarnes
Copy link
Owner

@mjordan I don't see the link to the attached test files mentioned in point two of the how to test section. Would you please attach the files when you get a moment? Thank you in advance.

@mjordan
Copy link
Collaborator Author

mjordan commented Jun 8, 2017

Woops, sorry, file is now attached below.

issue-392.zip

@MarcusBarnes
Copy link
Owner

Appears to work as expected. Thank you @mjordan.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants