Git Product home page Git Product logo

Comments (12)

dizda avatar dizda commented on June 22, 2024

Looks great!

Just realized that we may need the filename of the backup in BackupEvent?

from cloudbackupbundle.

Nyholm avatar Nyholm commented on June 22, 2024

Hm, tell me more. Why should filename be in the BackupEvent?

from cloudbackupbundle.

dizda avatar dizda commented on June 22, 2024

When you got many projects you might want to know which backup has been completed

from cloudbackupbundle.

Nyholm avatar Nyholm commented on June 22, 2024

The UploadEvent is dispatched after a file it uploaded. It might be one or it might be 100 files on 4 clients.
We can not use filename in Backup event since we don't know how many files or if they still are named the same.
We could however use the output_file_prefix or a variant of that... But... tell me more. Where are you looking when you "want to know which backup has been completed". In a centralized logger? Don't you see from which project the logging messages comes from? I don't quite understand.

from cloudbackupbundle.

jongotlin avatar jongotlin commented on June 22, 2024

What BackupEvent could have as a property is how long it took the operation to finish.

from cloudbackupbundle.

Nyholm avatar Nyholm commented on June 22, 2024

Is that interesting for all events?

from cloudbackupbundle.

jongotlin avatar jongotlin commented on June 22, 2024

Only for those that actually may take some time.

from cloudbackupbundle.

dizda avatar dizda commented on June 22, 2024

@Nyholm Hmm as far as I know, we only upload one archive to many destinations, so we know what will be the filename of the backup, right?

from cloudbackupbundle.

Nyholm avatar Nyholm commented on June 22, 2024

The UploadEvent is dispatched from the ClientManger it will know of the filenames.

But do you think it is within the scope of the BackupEvent to know all the filenames that was uploaded?
Or, maybe it makes sense to have an array of filenames in the BackupEvent form a DX perspective. It is a lot easier that collect info from UploadEvent and then take action as soon as BackupEvent is dispatched.

from cloudbackupbundle.

dizda avatar dizda commented on June 22, 2024

Oh ok I get it.
So you suggest to add an event listener on both events to get the filename from the BackupEvent?

from cloudbackupbundle.

Nyholm avatar Nyholm commented on June 22, 2024

Yeah, That was my suggestion but I'm reconsidering it now. Because we might do things too complicated for the users.

from cloudbackupbundle.

ZCJ avatar ZCJ commented on June 22, 2024

so how would you get now the backup file name that is created?
I understand that there is only 1 event dispatched upon success and the event itself does not have any information.

if ($successful) { $this->eventDispatcher->dispatch(BackupEvent::BACKUP_COMPLETED, new BackupEvent()); }

The reason I need the file name is that I need to send an email to the admin to inform him that the backup file (XXX) has been created and uploaded to storage.

from cloudbackupbundle.

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.