Updates from April, 2015 Toggle Comment Threads | Keyboard Shortcuts

  • gio 11:30 pm on April 21, 2015 Permalink  

    CReP: IA dev workflow using git-svn 

    • WARNING:: if you are working on vm-home to avoid out-of-memory problems do:

      ulimit -v unlimited
    • Pull the last commits to the local master branch with:

      git checkout master
      git svn rebase
    • create a working branch

      git checkout -b devBranch
    • use this branch to develop your feature and fix the bugs
      and commit your work to the local git repository with

      git commit -m 'bla bla bla bla'
    • create a test branch like the master

      git checkout master
      git svn rebase
      git checkout -b sandMaster

      and merge all the commits from the devBranch branch in an atomic commit (using –squash)

      git merge --squash devBranch

      check what is going on

      git status
      git diff --staged

      if everything looks ok, commit it

      git commit
    • Now you can check if this code is working correctly
      to be sure that the commit to the SVN will work correctly…
      If everything is fine…
    • …let’s do the same commit to the master branch

      git checkout master
      git merge --squash devBranch
      git status
      git diff --staged
      git commit
      git svn rebase
    • Let’s do a dry-run and check the patches

      git svn dcommit --dry-run
      git diff-tree 25e084b618580d69f5b57d8f9c1ca37045cf65dd~1 25e084b618580d69f5b57d8f9c1ca37045cf65dd -p
    • If everything is correct it’s time to commit to the SVN remote repo
    • git svn dcommit
    • You can push the code using the pi interface
  • gio 10:02 pm on April 21, 2015 Permalink
    Tags: ergonomy   

    Ergonomics for Healthy Working 

    IMG_1268 (1)

  • gio 5:44 pm on April 21, 2015 Permalink
    Tags: cluster republisher,   

    CReP: how to RePublisher-checkout a "lost" item 

    When a book is moved to a new datanode you have to RePublisher-checkout the book again.

    First you have to know the directory of the item,
    to do so at manage page:


    click on Locate directory of item in cluster.

    for our example: /25/items/testmytestgiogio0000gio/

    then run the RePublisher-checkout.php:


    NOTE: be sure the RePub State for the item is 12.

  • gio 9:29 pm on April 14, 2015 Permalink
    Tags: ,   

    CReP: run common code from your petabox tree 

    to be sure that the Cluster RePublisher is running the code on your petabox tree,
    be sure these two php variables are set:

    $_SERVER['PETABOX_HOME'] = '/home/giovanni/petabox';
    $_SERVER['DOCUMENT_ROOT'] = $_SERVER['PETABOX_HOME'] . '/www/datanode/';
    • gio 11:55 pm on May 17, 2016 Permalink

      In /etc/hosts on local machine, map `xxx-gio.archive.org` to datanode’s IP (and that’s a literal `xxx`). Then, thanks to config in `petabox/etc/nginx/archive.conf` which lives on every data node, it should use the code in your vm-home1 home directory.

  • gio 6:37 pm on April 1, 2015 Permalink
    Tags: lending, , waitinglists   

    OL: how to fix a common problem with the waitinglists 

    For the OL admins: the following solution is implemented with the Upload loan info button, on the Borrow – Administration page.

    The lending system is managed through Internet Archive.
    When there is a connection problem between IA and OL during a loan update request (returning or borrowing) it is possible that the waitinglist stalls in an undetermined status.

    To fix this situation we are using the script:

    The script accept three commands:

        if cmd == "update-loans":
        elif cmd == "update-waitinglists":
        elif cmd == "update-waitinglist":

    To update and fix a waitinglist we use the update-waitinglist command:

    python scripts/openlibrary-server openlibrary.yml runscript scripts/update-loans.py update-waitinglist <InternteArchiveItemId>

    :: If the script does not run correctly and you receive this error message:
    “Required security token not privided or didn’t match.”
    it means you don’t have the ia_ol_shared_key in yours openlibrary.yml

    :: Do not run the script as root

Compose new post
Next post/Next comment
Previous post/Previous comment
Show/Hide comments
Go to top
Go to login
Show/Hide help
shift + esc