public void run() {
		while(true)
			try {				
				sm.check();
				boolean ans = sm.getStatus();
				sp.setStatus(ans);
				sp.setWaiting(StockController.commits.size());
				if(!ans && lastans){
					
					Main.setProducts(file_model.fillArrayList());
				}else if(!lastans && ans){
					int a = st_m.executeCommits(StockController.commits);
					if(a==1){
						StockController.commits.clear();
					}
				}
				lastans = ans;
				sleep(sleeptime);
				
			} catch (Exception e) {
				e.printStackTrace();
			}
		
		//System.out.println("DONE! " + getName());
	}