uWSGI trying to load non-existing ini - uwsgi

so I have been trying to add a python app to uwsgi, but it was failing and I decided to redo (and also rename) the application. So I deleted old ini file from /etc/uwsgi/sites-available (lets call it 'example1.ini' and also the application directory from the server ('example1').
Then I uploaded a new directory (lets call it 'example2') and created a new ini file called 'example2.ini'. I also created a symlink.
Now when I try to restart uwsgi, it fails and when I see its status it is trying to load the old ini file (example1.ini) and it causes it to fail. In addition to that, it does not even load the new app.
Is there any way to reload all apps/remove cache/refresh the configurations?

Update: I hope this helps someone. There was no obvious fix so I tried to reboot the whole server (computer) and it helped.

Related

having external files in an electron application

I have an electron app, and when I make it, it packages and compiles everything.
Sounds like it works perfectly right?
Well, problem is I want one of the folders to not be compiled, but still be accessible by my static files, so the users can add or remove content from the folders.
I've tried making it in a seperate folder, but then it can't find the files even when it's placed in the correct relative path.
Overall, I want my app to exist next to a folder and my <script src="./folder/script.js"></script> to actually be able to access it.
I'm new to basically anything node or electron so i'm probably making some dumb mistake.
Thanks in advance.
Having your user touching files close to your Electron application may be fraught with danger. If they accidently overwrite an important file or accidently delete an important file then your application may stop working and require the user to perform a re-install.
Instead, have any default files the user may need to "touch" packaged up with your application and then upon your applications first run, copy these files (and any necessary folder structure) over to the users home, desktop, documents, downloads or even userData directory.
That way, your application will always know where to find them and the directory is a directory your user will already be comfortable adding files to and removing files from.
You can always let the use choose where these files are stored as a settings option which persists in an application setting file, using something similar to path.join(app.getPath('userData'), 'settings.json');
See Electron's app.getPath(name) for more information.

Swift: Replacing sqlite file fails

I am working on an App for iPhone and I try to develop a backup function for my sqlite database to the users dropbox:
If the user is doing a (manual) backup, my file „myDatabase.sqlite3“ is copied to a selected folder in the dropbox.
If the user imports the backup, I am replacing the „myDatabase.sqlite3“ file with the one from the dropbox. After this, all Selects on the database fail with the error „[logging] disk I/O error in „SELECT…“. BUT if I restart my app, everything works great!
So I think it’s something missing with the connection (of course I opened a new connection after replacing the file)? Maybe something isn’t refreshed or rebuild? What am I missing? I don’t have these *-shm and *-wal files I read about in some tutorials.
Thanks a lot for your help, I have spent hours and days trying everything I could find…
I found the mistake: it was a timing problem... I opened the new connection while the copy process hasn't finished!

error 75 path/file access lotus notes while deleting files

I have a lotus notes agent which takes some files from the server and does some processing and then deletes those files.
For deleting we have used the Kill command. It was working fine, but now we are getting the error "path/file access". Could anyone please help me on this.
If the files are NSF files and your code is opening them as NotesDatabase objects via the server, the files on disk will not be closed even after you are done using them and the objects are gone. That's because the server maintains a cache of open NSF files. You cannot delete the files until they are out of the cache. (This may or may not be true if you specified "" instead of the server name when you opened the NotesDatabase object. I don't recall, but if the workaround had been as easy as just opening locally using "", I think we would have done that.)
To get around this in the past, what I have done is just leave the files on disk and write another agent that runs once per day to clean them up. It's ugly, but it was the only way to deal with the problem.

How to get a content of file which is being written by an application?

This application always create a file when you activate a function (lets say, a log file). This file cannot be opened during the running - but I need its content before application closes (another process uses it, so I cant even view it). Is there a way to "hook" it somehow?
Im working with Delphi, but I accept any other solution.
So, summary, I need to know what file application created (it always creates other, but in the same directory) and the content it wrote. Any help appreciated.
I found a workaround:
copy the file, and operate on the cloned one:
http://www.howtogeek.com/howto/windows-vista/backupcopy-files-that-are-in-use-or-locked-in-windows/

Cant update .html.erb file in a Ruby on Rail application

I'm totally new in RubyonRail field:
i tried to update the html in a view file .html.erb, but after uploading the file via ftp, the changes dont take place even if the file has changed.
It seems to be cached, is there something I miss?
D.
you need to be sure and restart the application; how you do so depends on your hosting situation, but try touching /tmp/restart.txt. Passenger-based installs (most low-end hosting fits this description) will restart your app when the mod time on that file changes.

Resources