Forum

Thread tagged as: Question, Error, Api

Run importer script using command line

Is it possible to run importer scripts using the terminal? Currently one I am running is importing thousands of data items including assets and is hitting timeout limits - currently set to 15 minutes. I can keep increasing the time but it doesn't seem sustainable.

It looks like a similar issue to the Scheduled Tasks thread, the error I am getting is: Integrity constraint violation: 1048 Column 'itemUpdatedBy' cannot be null.

I've updated to 3.0.11 and the same issue occurs.

James Wigger

James Wigger 0 points

  • 3 years ago
Drew McLellan

Drew McLellan 2638 points
Perch Support

Is there a line number or anything else other than that?

Looks like the issue is related to not being logged in:

Notice: Undefined index: userID in /Users/James/Repositories/Shooting Star/Shooting-Star-Core-Site/public/admin/core/lib/PerchBase.class.php on line 125

Call Stack
#   Time    Memory  Function    Location
1   0.0013  386760  {main}( )   .../NewsCollectionImport.php:0
2   5.0620  31526064    PerchCollectionImporter->add_item( )    .../NewsCollectionImport.php:128
3   5.6600  31903552    PerchContent_Collection->add_new_item( )    .../PerchCollectionImporter.class.php:73
4   5.7910  31905776    PerchContent_CollectionItems->create( ) .../PerchContent_Collection.class.php:268
5   5.8094  32005336    PerchBase->id( )    .../PerchContent_CollectionItems.class.php:25

Error: Call to a member function itemID() on null in /Users/James/Repositories/Shooting Star/Shooting-Star-Core-Site/public/admin/core/runway/lib/PerchCollectionImporter.class.php on line 76

Call Stack
#   Time    Memory  Function    Location
1   0.0013  386760  {main}( )   .../NewsCollectionImport.php:0
2   5.0620  31526064    PerchCollectionImporter->add_item( )    .../NewsCollectionImport.php:128
Drew McLellan

Drew McLellan 2638 points
Perch Support

Yes, I think so. We'll need to look at it next time it's updated.