Giter Site home page Giter Site logo

Comments (4)

apulverizer avatar apulverizer commented on June 12, 2024

Hi @jmdye,

Currently the import_workers script does detect invalid workers (usernames that are not in your org). It logs a warning message about this but does not stop the script.

See lines: https://github.com/Esri/workforce-scripts/blob/master/arcgis_api_for_python/import_workers.py#L130

Are you suggesting we first parse the csv and detect that all users are valid, then import all the workers. Currently, we go line by line which why we didn't want to raise an exception (which would lead to a partial import).

from workforce-scripts.

jmdye avatar jmdye commented on June 12, 2024

Yes. My suggestion is to throw a fatal error and exit the script without importing any workers. Reason being that if your workers csv contains invalid workers, your assignments csv probably does as well. However, if your assignments csv contains an invalid worker for an assignment, then a fatal error is thrown there meaning you can get through a ton of assignments only to have to start over again if your assignments csv contained an invalid worker. That's painful when youre talking about hundreds or thousands of assignments.

from workforce-scripts.

apulverizer avatar apulverizer commented on June 12, 2024

See PR #18 let me know what you think when you have a chance.

from workforce-scripts.

apulverizer avatar apulverizer commented on June 12, 2024

Merged the PR. Closing.

from workforce-scripts.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.